package STUDENT.TRANBANGTUNG.day05_23_2016.Bai10;

import java.util.Scanner;

public class Views {
	public static void main(String[] args) {
		int a;
		int b;
		Scanner sc;
		System.out.println("nhap so luong hoc sinh!");
		sc = new Scanner(System.in);
		a = sc.nextInt();
		System.out.println("nhap so luong cau hoi!");
		sc = new Scanner(System.in);
		b = sc.nextInt();
		Objects obj = new Objects(a, b);
		String[][] cautraloi = new String[a][b];
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				System.out.println("nhap cau tra loi thu " + (j + 1) + " cua hoc sinh " + (i + 1) + "!");
				sc = new Scanner(System.in);
				cautraloi[i][j]=sc.nextLine();
			}
		}//
		obj.setAnswersofStudent(cautraloi);
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				System.out.println(""+obj.getAnswersofStudent()[i][j]);
			}
		}
		//
		
		//
		String[] dapan = new String[b];
		for (int j = 0; j < b; j++) {
			System.out.println("nhap dap an cua cau hoi " + (j + 1));
			sc = new Scanner(System.in);
			dapan[j]=sc.nextLine();
		}
		obj.setResult(dapan);
		//
		for(int j=0;j<b;j++){
			System.out.println(""+obj.getResult()[j]);
			}
		Controllers con= new Controllers();
		double[] diem=con.Mark(obj);
		for(int i=0;i<obj.getPoint().length;i++){System.out.println(""+diem[i]);}
	}
}
